package evo.springboot.controller;

import evo.springboot.model.Student;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

//@Controller
@RestController
public class ControllerTest {
    @RequestMapping(value = "/test")
    public Object test(){
        Student student = new Student();
        student.setId(1);
        student.setName("jojo");
        return student;
    }


    @RequestMapping(value = "/test2")
    public Object test2(Integer id){
        Student student = new Student();
        student.setId(id);
        return student;
    }
}
